<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NMSecretAgent</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libnm-glib Reference Manual">
<link rel="up" href="ch02.html" title="libnm-glib API Reference">
<link rel="prev" href="libnm-glib-nm-types.html" title="nm-types">
<link rel="next" href="NMVPNConnection.html" title="NMVPNConnection">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libnm-glib-nm-types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libnm-glib Reference Manual</th>
<td><a accesskey="n" href="NMVPNConnection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#NMSecretAgent.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#NMSecretAgent.description" class="shortcut">Description</a>
                   | 
                  <a href="#NMSecretAgent.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#NMSecretAgent.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#NMSecretAgent.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="NMSecretAgent"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="NMSecretAgent.top_of_page"></a>NMSecretAgent</span></h2>
<p>NMSecretAgent</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="NMSecretAgent.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="NMSecretAgent.html#NMSecretAgent-struct" title="NMSecretAgent">NMSecretAgent</a>;
                    <a class="link" href="NMSecretAgent.html#NMSecretAgentClass" title="NMSecretAgentClass">NMSecretAgentClass</a>;
<span class="returnvalue">void</span>                (<a class="link" href="NMSecretAgent.html#NMSecretAgentDeleteSecretsFunc" title="NMSecretAgentDeleteSecretsFunc ()">*NMSecretAgentDeleteSecretsFunc</a>)   (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
enum                <a class="link" href="NMSecretAgent.html#NMSecretAgentError" title="enum NMSecretAgentError">NMSecretAgentError</a>;
enum                <a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFlags" title="enum NMSecretAgentGetSecretsFlags">NMSecretAgentGetSecretsFlags</a>;
<span class="returnvalue">void</span>                (<a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFunc" title="NMSecretAgentGetSecretsFunc ()">*NMSecretAgentGetSecretsFunc</a>)      (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *secrets</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="NMSecretAgent.html#NMSecretAgentSaveSecretsFunc" title="NMSecretAgentSaveSecretsFunc ()">*NMSecretAgentSaveSecretsFunc</a>)     (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
#define             <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-AUTO-REGISTER:CAPS" title="NM_SECRET_AGENT_AUTO_REGISTER">NM_SECRET_AGENT_AUTO_REGISTER</a>
#define             <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-ERROR:CAPS" title="NM_SECRET_AGENT_ERROR">NM_SECRET_AGENT_ERROR</a>
#define             <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-IDENTIFIER:CAPS" title="NM_SECRET_AGENT_IDENTIFIER">NM_SECRET_AGENT_IDENTIFIER</a>
#define             <a class="link" href="NMSecretAgent.html#NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS" title="NM_SECRET_AGENT_REGISTRATION_RESULT">NM_SECRET_AGENT_REGISTRATION_RESULT</a>
<span class="returnvalue">void</span>                <a class="link" href="NMSecretAgent.html#nm-secret-agent-delete-secrets" title="nm_secret_agent_delete_secrets ()">nm_secret_agent_delete_secrets</a>      (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentDeleteSecretsFunc" title="NMSecretAgentDeleteSecretsFunc ()"><span class="type">NMSecretAgentDeleteSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="NMSecretAgent.html#nm-secret-agent-error-quark" title="nm_secret_agent_error_quark ()">nm_secret_agent_error_quark</a>         (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="NMSecretAgent.html#nm-secret-agent-get-secrets" title="nm_secret_agent_get_secrets ()">nm_secret_agent_get_secrets</a>         (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *setting_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **hints</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFlags" title="enum NMSecretAgentGetSecretsFlags"><span class="type">NMSecretAgentGetSecretsFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFunc" title="NMSecretAgentGetSecretsFunc ()"><span class="type">NMSecretAgentGetSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="NMSecretAgent.html#nm-secret-agent-register" title="nm_secret_agent_register ()">nm_secret_agent_register</a>            (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="NMSecretAgent.html#nm-secret-agent-save-secrets" title="nm_secret_agent_save_secrets ()">nm_secret_agent_save_secrets</a>        (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentSaveSecretsFunc" title="NMSecretAgentSaveSecretsFunc ()"><span class="type">NMSecretAgentSaveSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="NMSecretAgent.html#nm-secret-agent-unregister" title="nm_secret_agent_unregister ()">nm_secret_agent_unregister</a>          (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="NMSecretAgent.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----NMSecretAgent
</pre>
</div>
<div class="refsect1">
<a name="NMSecretAgent.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="NMSecretAgent.html#NMSecretAgent--auto-register" title='The "auto-register" property'>auto-register</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
  "<a class="link" href="NMSecretAgent.html#NMSecretAgent--identifier" title='The "identifier" property'>identifier</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="NMSecretAgent.html#NMSecretAgent--registered" title='The "registered" property'>registered</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
</pre>
</div>
<div class="refsect1">
<a name="NMSecretAgent.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="NMSecretAgent.html#NMSecretAgent-registration-result" title='The "registration-result" signal'>registration-result</a>"                            : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="NMSecretAgent.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="NMSecretAgent.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="NMSecretAgent-struct"></a><h3>NMSecretAgent</h3>
<pre class="programlisting">typedef struct _NMSecretAgent NMSecretAgent;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentClass"></a><h3>NMSecretAgentClass</h3>
<pre class="programlisting">typedef struct {
	GObjectClass parent;

	/* Virtual methods for subclasses */

	/* Called when the subclass should retrieve and return secrets.  Subclass
	 * must copy or reference any arguments it may require after returning from
	 * this method, as the arguments will freed (except for 'agent', 'callback',
	 * and 'user_data' of course).  If the request is canceled, the callback
	 * should still be called, but with the NM_SECRET_AGENT_ERROR_AGENT_CANCELED
	 * error.
	 */
	void (*get_secrets) (NMSecretAgent *agent,
	                     NMConnection *connection,
	                     const char *connection_path,
	                     const char *setting_name,
	                     const char **hints,
	                     NMSecretAgentGetSecretsFlags flags,
	                     NMSecretAgentGetSecretsFunc callback,
	                     gpointer user_data);

	/* Called when the subclass should cancel an outstanding request to
	 * get secrets for a given connection.  Canceling the request MUST
	 * call the callback that was passed along with the initial get_secrets
	 * call, sending the NM_SECRET_AGENT_ERROR/NM_SECRET_AGENT_ERROR_AGENT_CANCELED
	 * error to that callback.
	 */
	void (*cancel_get_secrets) (NMSecretAgent *agent,
	                            const char *connection_path,
	                            const char *setting_name);

	/* Called when the subclass should save the secrets contained in the
	 * connection to backing storage.  Subclass must copy or reference any
	 * arguments it may require after returning from this method, as the
	 * arguments will freed (except for 'agent', 'callback', and 'user_data'
	 * of course).
	 */
	void (*save_secrets) (NMSecretAgent *agent,
	                      NMConnection *connection,
	                      const char *connection_path,
	                      NMSecretAgentSaveSecretsFunc callback,
	                      gpointer user_data);

	/* Called when the subclass should delete the secrets contained in the
	 * connection from backing storage.  Subclass must copy or reference any
	 * arguments it may require after returning from this method, as the
	 * arguments will freed (except for 'agent', 'callback', and 'user_data'
	 * of course).
	 */
	void (*delete_secrets) (NMSecretAgent *agent,
	                        NMConnection *connection,
	                        const char *connection_path,
	                        NMSecretAgentDeleteSecretsFunc callback,
	                        gpointer user_data);

	/* Signals */
	void (*registration_result) (NMSecretAgent *agent, GError *error);

	/* Padding for future expansion */
	void (*_reserved1) (void);
	void (*_reserved2) (void);
	void (*_reserved3) (void);
	void (*_reserved4) (void);
	void (*_reserved5) (void);
	void (*_reserved6) (void);
} NMSecretAgentClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentDeleteSecretsFunc"></a><h3>NMSecretAgentDeleteSecretsFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*NMSecretAgentDeleteSecretsFunc)   (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Called as a result of a request by NM to delete secrets.  When the
<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished deleting the secrets, this function
should be called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
<td>the secret agent object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the connection for which secrets were to be deleted</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>if the deleting secrets failed, give a descriptive error here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to the function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentError"></a><h3>enum NMSecretAgentError</h3>
<pre class="programlisting">typedef enum {
	NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0, /*&lt; nick=NotAuthorized &gt;*/
	NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, /*&lt; nick=InvalidConnection &gt;*/
	NM_SECRET_AGENT_ERROR_USER_CANCELED,      /*&lt; nick=UserCanceled &gt;*/
	NM_SECRET_AGENT_ERROR_AGENT_CANCELED,     /*&lt; nick=AgentCanceled &gt;*/
	NM_SECRET_AGENT_ERROR_INTERNAL_ERROR,     /*&lt; nick=InternalError &gt;*/
	NM_SECRET_AGENT_ERROR_NO_SECRETS,         /*&lt; nick=NoSecrets &gt;*/
} NMSecretAgentError;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentGetSecretsFlags"></a><h3>enum NMSecretAgentGetSecretsFlags</h3>
<pre class="programlisting">typedef enum {
	NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE = 0x0,
	NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION = 0x1,
	NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW = 0x2
} NMSecretAgentGetSecretsFlags;
</pre>
<p>
<a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFlags" title="enum NMSecretAgentGetSecretsFlags"><span class="type">NMSecretAgentGetSecretsFlags</span></a> values modify the behavior of a GetSecrets request.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="NM-SECRET-AGENT-GET-SECRETS-FLAG-NONE:CAPS"></a><span class="term"><code class="literal">NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE</code></span></p></td>
<td>no special behavior; by default no
user interaction is allowed and requests for secrets are fulfilled from
persistent storage, or if no secrets are available an error is returned.
</td>
</tr>
<tr>
<td><p><a name="NM-SECRET-AGENT-GET-SECRETS-FLAG-ALLOW-INTERACTION:CAPS"></a><span class="term"><code class="literal">NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION</code></span></p></td>
<td>allows the request to
interact with the user, possibly prompting via UI for secrets if any are
required, or if none are found in persistent storage.
</td>
</tr>
<tr>
<td><p><a name="NM-SECRET-AGENT-GET-SECRETS-FLAG-REQUEST-NEW:CAPS"></a><span class="term"><code class="literal">NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW</code></span></p></td>
<td>explicitly prompt for new
secrets from the user.  This flag signals that NetworkManager thinks any
existing secrets are invalid or wrong.  This flag implies that interaction
is allowed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentGetSecretsFunc"></a><h3>NMSecretAgentGetSecretsFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*NMSecretAgentGetSecretsFunc)      (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *secrets</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Called as a result of a request by NM to retrieve secrets.  When the
<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished retrieving secrets and is ready to
return them, or to return an error, this function should be called with
those secrets or the error.
</p>
<p>
To easily create the hash table to return the WiFi PSK, you could do
something like this:
</p>
<div class="example">
<a name="id667964"></a><p class="title"><b>Example 1. Creating a secrets hash</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">NMConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">secrets</span><span class="symbol">;</span>
<span class="usertype">NMSettingWirelessSecurity</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">s_wsec</span><span class="symbol">;</span>
<span class="usertype">GHashTable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">secrets_hash</span><span class="symbol">;</span>

<span class="normal">secrets </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-new">nm_connection_new</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="normal">s_wsec </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html">NMSettingWirelessSecurity</a> </span><span class="symbol">*)</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html#nm-setting-wireless-security-new">nm_setting_wireless_security_new</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s_wsec</span><span class="symbol">),</span>
<span class="normal">              <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSettingWirelessSecurity.html#NM-SETTING-WIRELESS-SECURITY-PSK:CAPS">NM_SETTING_WIRELESS_SECURITY_PSK</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"my really cool PSK"</span><span class="symbol">,</span>
<span class="normal">              <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-add-setting">nm_connection_add_setting</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">,</span><span class="normal"> </span><span class="function">NM_SETTING</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s_wsec</span><span class="symbol">));</span>
<span class="normal">secrets_hash </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-to-hash">nm_connection_to_hash</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">);</span>

<span class="symbol">(</span><span class="normal">call the NMSecretAgentGetSecretsFunc </span><span class="usertype">with</span><span class="normal"> secrets_hash</span><span class="symbol">)</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets</span><span class="symbol">);</span>
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#g-hash-table-unref">g_hash_table_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">secrets_hash</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
<td>the secret agent object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the connection for which secrets were requested</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>secrets</code></em> :</span></p></td>
<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> containing
the requested secrets in the same format as an <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> hash (as
created by <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html#nm-connection-to-hash"><code class="function">nm_connection_to_hash()</code></a> for example).  Each key in <em class="parameter"><code>secrets</code></em>
should be the name of a <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMSetting.html"><span class="type">NMSetting</span></a> object (like "802-11-wireless-security")
and each value should be a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.  The sub-hashes map string:<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
where the string is the setting property name (like "psk") and the value
is the secret. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 GLib.HashTable]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>if the secrets request failed, give a descriptive error here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to the function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgentSaveSecretsFunc"></a><h3>NMSecretAgentSaveSecretsFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*NMSecretAgentSaveSecretsFunc)     (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Called as a result of a request by NM to save secrets.  When the
<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> subclass has finished saving the secrets, this function
should be called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
<td>the secret agent object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the connection for which secrets were to be saved</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>if the saving secrets failed, give a descriptive error here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to the function</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="NM-SECRET-AGENT-AUTO-REGISTER:CAPS"></a><h3>NM_SECRET_AGENT_AUTO_REGISTER</h3>
<pre class="programlisting">#define NM_SECRET_AGENT_AUTO_REGISTER       "auto-register"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NM-SECRET-AGENT-ERROR:CAPS"></a><h3>NM_SECRET_AGENT_ERROR</h3>
<pre class="programlisting">#define NM_SECRET_AGENT_ERROR         (nm_secret_agent_error_quark ())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NM-SECRET-AGENT-IDENTIFIER:CAPS"></a><h3>NM_SECRET_AGENT_IDENTIFIER</h3>
<pre class="programlisting">#define NM_SECRET_AGENT_IDENTIFIER          "identifier"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="NM-SECRET-AGENT-REGISTRATION-RESULT:CAPS"></a><h3>NM_SECRET_AGENT_REGISTRATION_RESULT</h3>
<pre class="programlisting">#define NM_SECRET_AGENT_REGISTRATION_RESULT "registration-result"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-delete-secrets"></a><h3>nm_secret_agent_delete_secrets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                nm_secret_agent_delete_secrets      (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentDeleteSecretsFunc" title="NMSecretAgentDeleteSecretsFunc ()"><span class="type">NMSecretAgentDeleteSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously ask the agent to delete all saved secrets belonging to
<em class="parameter"><code>connection</code></em>.
</p>
<p>
VFunc: delete_secrets
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-error-quark"></a><h3>nm_secret_agent_error_quark ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              nm_secret_agent_error_quark         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-get-secrets"></a><h3>nm_secret_agent_get_secrets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                nm_secret_agent_get_secrets         (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *setting_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **hints</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFlags" title="enum NMSecretAgentGetSecretsFlags"><span class="type">NMSecretAgentGetSecretsFlags</span></a> flags</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentGetSecretsFunc" title="NMSecretAgentGetSecretsFunc ()"><span class="type">NMSecretAgentGetSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asyncronously retrieve secrets belonging to <em class="parameter"><code>connection</code></em> for the
setting <em class="parameter"><code>setting_name</code></em>.  <em class="parameter"><code>flags</code></em> indicate specific behavior that the secret
agent should use when performing the request, for example returning only
existing secrets without user interaction, or requesting entirely new
secrets from the user.
</p>
<p>
VFunc: get_secrets
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> for which we're asked secrets</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>setting_name</code></em> :</span></p></td>
<td>the name of the secret setting</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hints</code></em> :</span></p></td>
<td>hints to the agent. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags that modify the behavior of the request</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-register"></a><h3>nm_secret_agent_register ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            nm_secret_agent_register            (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>);</pre>
<p>
Registers the <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> with the NetworkManager secret manager,
indicating to NetworkManager that the agent is able to provide and save
secrets for connections on behalf of its user.  Registration is an
asynchronous operation and its success or failure is indicated via the
'registration-result' signal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if registration was successfully requested (this does
not mean registration itself was successful), <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if registration was not
successfully requested.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-save-secrets"></a><h3>nm_secret_agent_save_secrets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                nm_secret_agent_save_secrets        (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="NMSecretAgent.html#NMSecretAgentSaveSecretsFunc" title="NMSecretAgentSaveSecretsFunc ()"><span class="type">NMSecretAgentSaveSecretsFunc</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asyncronously ensure that all secrets inside <em class="parameter"><code>connection</code></em>
are stored to disk.
</p>
<p>
VFunc: save_secrets
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>a <a href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/NMConnection.html"><span class="type">NMConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback, to be invoked when the operation is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>caller-specific data to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="nm-secret-agent-unregister"></a><h3>nm_secret_agent_unregister ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            nm_secret_agent_unregister          (<em class="parameter"><code><a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *self</code></em>);</pre>
<p>
Unregisters the <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> with the NetworkManager secret manager,
indicating to NetworkManager that the agent is will no longer provide or
store secrets on behalf of this user.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if unregistration was successful, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it was not.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="NMSecretAgent.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="NMSecretAgent--auto-register"></a><h3>The <code class="literal">"auto-register"</code> property</h3>
<pre class="programlisting">  "auto-register"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>
If TRUE, the agent will attempt to automatically register itself after
it is created (via an idle handler) and to re-register itself if
NetworkManager restarts.  If FALSE, the agent does not automatically
register with NetworkManager, and <a class="link" href="NMSecretAgent.html#nm-secret-agent-register" title="nm_secret_agent_register ()"><code class="function">nm_secret_agent_register()</code></a> must be
called.  If 'auto-register' is TRUE, calling <a class="link" href="NMSecretAgent.html#nm-secret-agent-unregister" title="nm_secret_agent_unregister ()"><code class="function">nm_secret_agent_unregister()</code></a>
will suppress auto-registration until <a class="link" href="NMSecretAgent.html#nm-secret-agent-register" title="nm_secret_agent_register ()"><code class="function">nm_secret_agent_register()</code></a> is
called, which re-enables auto-registration.
</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgent--identifier"></a><h3>The <code class="literal">"identifier"</code> property</h3>
<pre class="programlisting">  "identifier"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>
Identifies this agent; only one agent in each user session may use the
same identifier.  Identifier formatting follows the same rules as
D-Bus bus names with the exception that the ':' character is not
allowed.  The valid set of characters is "[A-Z][a-z][0-9]_-." and the
identifier is limited in length to 255 characters with a minimum
of 3 characters.  An example valid identifier is 'org.gnome.nm-applet'
(without quotes).
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="NMSecretAgent--registered"></a><h3>The <code class="literal">"registered"</code> property</h3>
<pre class="programlisting">  "registered"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
<p>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the agent is registered with NetworkManager, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.
</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="NMSecretAgent.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="NMSecretAgent-registration-result"></a><h3>The <code class="literal">"registration-result"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="NMSecretAgent.html" title="NMSecretAgent"><span class="type">NMSecretAgent</span></a> *agent,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       error,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Indicates the result of a registration request; if <em class="parameter"><code>error</code></em> is NULL the
request was successful.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
<td>the agent that received the signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>the error, if any, that occured while registering</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>